<?php
// +----------------------------------------------------------------------
// | 票付通演出类场馆列表
// +----------------------------------------------------------------------
// | Author: TongBC <501468940@qq.com>
// +----------------------------------------------------------------------
// | Date  : 2015/06/10
// +----------------------------------------------------------------------
// | www.12301.cc/pft_show.html?m=venue_list
// +----------------------------------------------------------------------
include_once '/var/www/html/new/d/module/common/Db.class.php';
$dbConf = include '/var/www/html/new/d/module/common/db.conf.php';// 远端服务器配置信息

use \PFT\Db;
Db::Conf($dbConf['remote_1']);



include 'PftShow.class.php';
$obj = new \PFT\Show\PftShow(Db::Connect());
$use_date = base64_decode($_GET['d']);
$date = $_GET['bt']? $_GET['bt'] : date('Y-m-d');
$rid = abs($_GET['rid']);
$params = array(
    'apply_did' => $_SESSION['sid'],
    'venus_id'  => $rid,
    'use_date'  => $date,
    'r.status'    => 0,
);

$sql = "SELECT venue_name FROM pft_venues WHERE id={$rid} LIMIT 1";
$stmt = Db::Connect()->prepare($sql);
$stmt->execute();
$venue_name = $stmt->fetchColumn(0);

//print_r()
$rounds = $obj->GetRoundListByDate($params, true);
//print_r($rounds);
//print_r($rounds);


//$rounds = array(
//    array(
//        'round_name'=>'ccc',
//        'bt'=>'10:10',
//        'et'=>'10:50',
//        'zone_id'=>1,
//        'id'=>1
//    ),
//);
include ROOT_PATH . 'tpl/pft_show/rounds.html';